Creating Excel file of module attributes

I  need to create an Excel spreadsheet that contains multiple module attributes for each module in a project.  I'm pretty sure I'm getting most of the appropriate values, but I'd like some guidance.  First of all, here are the columns I'm filling in... I need to gather the folder name in which the module is, the name of the module itself, the latest baseline information (major, minor and suffix), the description of the baseline, and, finally, the module above that it is linked to.  By this, I mean that an SSS links up to an SS.  Here is what I've :

void GetLastBaselineInfo(Module m) {
    Baseline bl;
    Baseline info;
    
    string modName = "";
    string blName = "";
    string desc = "";
    string linkTo = "";
    
    Folder f;
    
    ModuleVersion mv;
    ModuleProperties mp;
    
    bl = getMostRecentBaseline(m);
    mv = moduleVersion(m);
    info = baselineInfo(m);
    
    modName = name mv;
    blName = major(bl) "." minor(bl) " " suffix(bl) " - " dateOf(bl);
    desc = ???   (info.description?)
    linkTo = ???
}

I'm not sure how to get the description or the linked-to module.  Also, let me know if I'm doing the correct code for the other 2   If there is somebody who can help me with these, it would be greatly appreciated.

 

Chris

 

Chris


Christopher Cote - Fri Apr 05 08:03:38 EDT 2019

Re: Creating Excel file of module attributes
O.Wilkop - Sat Apr 06 05:40:45 EDT 2019

The baseline "description" is probably

string szDescription = annotation(bl);

The folder you can get with

Folder f = getParentFolder(m);

 

How you'd get the "linked to" module depends on how your process works in DOORS. Possible approaches would be doing a for object in module loop and checking the out links (maybe via a specific linkmodule) or a "for LinkModuleDescriptor in Folder" loop in the parent folder and checking getSourceName(lmd) and getTargetName(lmd). The first approach would go for actual existing links(and wouldn't work if no links exist yet), but would potentially get links into other, undesired, modules too (if you have any), the second form would only work if you set the link relationship in the module properties linkset tab.

Re: Creating Excel file of module attributes
Christopher Cote - Mon Apr 08 09:06:23 EDT 2019

O.Wilkop - Sat Apr 06 05:40:45 EDT 2019

The baseline "description" is probably

string szDescription = annotation(bl);

The folder you can get with

Folder f = getParentFolder(m);

 

How you'd get the "linked to" module depends on how your process works in DOORS. Possible approaches would be doing a for object in module loop and checking the out links (maybe via a specific linkmodule) or a "for LinkModuleDescriptor in Folder" loop in the parent folder and checking getSourceName(lmd) and getTargetName(lmd). The first approach would go for actual existing links(and wouldn't work if no links exist yet), but would potentially get links into other, undesired, modules too (if you have any), the second form would only work if you set the link relationship in the module properties linkset tab.

The 2nd version should work for me.  We always have linksets set up and that is really what I want to look through to get the linked to column.